/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine SDK - core/memory
// Copyright( c) 2013.  All Rights Reserved
//
// File:		AESystemTaskI.h
// Author:		Gianluca Belardelli
// Date:		09/04/2014
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AESYSTEMTASKI_H_
#define _AESYSTEMTASKI_H_

class AESystemTaskI
{
	friend class AEEngineSystem;

// Members
protected:
	AESystemSceneI	*m_lpSystemScene;

// Methods
public:
	/// <summary cref="ISystemTask::ISystemTask(ISystemScene*)">
    ///   Constructor.
    /// </summary>
    AESystemTaskI( AESystemSceneI *lpSystemScene )
        : m_lpSystemScene( lpSystemScene )
    {
    }

    /// <summary cref="ISystemTask::GetSystemScene">
    ///   Gets the scene for this task.
    /// </summary>
    /// <returns>The scene for this task.</returns>
	AESystemSceneI *GetSystemScene( void ) { return m_lpSystemScene; }

    /// <summary cref="ISystemTask::GetSystemType">
    ///   Gets the system type for this system task.
    /// </summary>
    /// <remarks>
    ///   This is a shortcut to getting the system type without having to go the system first.
    /// </remarks>
    /// <returns>The type of the system.</returns>
    virtual AEUINT32 GetSystemType( void ) = 0;

	/// <summary cref="ISystemTask::Update">
    ///   Function informing the task to perform its updates.
    /// </summary>
    /// <param name="DeltaTime">The time delta from the last call.</param>
    virtual void Update( AEFLOAT32 fDeltaTime ) = 0;

    /// <summary cref="ISystemTask::IsPrimaryThreadOnly">
	///   Implementing tasks should return True to indicate that their <c>Update</c> function
	///   should only be called from the primary thread.  False allows their <c>Update</c> function
    ///   to be called from an arbitrary thread.
    /// </summary>
    virtual AEBOOL32 IsPrimaryThreadOnly( void ) = 0;
};

#endif // _AESYSTEMTASKI_H_
